Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move ssrContext setting to core (#349, #370) #376

Closed
wants to merge 1 commit into from

Conversation

meteorlxy
Copy link
Member

@meteorlxy meteorlxy commented May 9, 2018

@@ -80,5 +80,12 @@ export default {
this.$route.path
)
}
},
created () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't be placed here, or it will be invoked for each component.

Copy link
Member Author

@meteorlxy meteorlxy May 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't put it here, we have some other choices:

  1. Ask users to put it mannually into the custom Layout.vue
  2. Wrap the themeLayout with another component, to which inject this snippets. fix: move ssrContext and updateMeta to core (#349, #370)  #389

return {
path: '',
frontmatter: {}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it to fix some bugs, or?

Copy link
Member Author

@meteorlxy meteorlxy May 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, there will be errors rendering NotFound.vue, as there is no $page match it. So we have to return an empty page data.

Copy link
Member Author

@meteorlxy meteorlxy May 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact it to fix a bug, and this bug has something to do with this PR.

I'll extract it to another PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants